<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        console.log(Date.now());
        //1754134017297
        console.log(new Date(1754134017297));

        //2030-1-1 19:28:30
        //Sat Aug 02 2025 19:26:57 GMT+0800 (中国标准时间) 

        console.log(new Date(1754134017297).getDate());
        console.log(new Date(1754134017297).getDay());
        console.log(new Date(1754134017297).getFullYear());
        //月份从0到11，所以需要 +1
        console.log(new Date(1754134017297).getMonth() + 1);

        //2030-1-1 19:28:30
        var year = new Date(1754134017297).getFullYear();
        var month = new Date(1754134017297).getMonth() + 1; 
        var day = new Date(1754134017297).getDate();   
        console.log(year + "-" + month + "-" + day);
        //阳历
        function leftDays() {
            var today = new Date();
            var endYear = new Date(today.getFullYear(),11,31,23,59,59,999);
            var msperDay = 24 * 60 * 60 * 1000;
            var left = (endYear.getTime() - today.getTime())/msperDay;
            console.log(Math.floor(left));
            
        }
        leftDays();
         



    </script>
</body>
</html>